import {httpRequest} from '@/request/https'

export default {
    /**
     * 年度计划分页查询
     * */
    postAnnualPlanPage: params => httpRequest({url: '/dis/spYearlyPlan/yearPlanPage', method: 'post', params}),
    /**
     * 年度计划调度
     * */
    postPlanSculing: params => httpRequest({url: '/dis/spYearlyPlan/scheme/add', method: 'post', params}),
    /**
     * 年度计划详情列表
     * */
    postAnnualPlanDetailPage: params => httpRequest({url: '/dis/spYearlyPlan/detail/page', method: 'post', params}),
    /**
     * 甘特图信息
     * */
    // getChartInfo: params => httpRequest({url: '/dis/spYearlyPlan/getPlanSchemeNewOne', method: 'get', params}),
    getChartInfo: params => httpRequest({url: `/dis/spYearlyPlan/getPlanScheme/chart`, method: 'post', params}),
    /**
     * 甘特图编辑
     * */
    getChartEdit: params => httpRequest({url: '/dis/spYearlyPlan/update', method: 'post', params}),
    /**
     * 甘特图保存
     * */
   // postChartSave: params => httpRequest({url: '/dis/spYearlyPlan/savePlanDetails', method: 'post', params}),
    postChartSave: params => httpRequest({url: '/dis/spYearlyPlan/getPlanScheme/chart/save', method: 'post', params}),
    /**
     * 甘特图分享
     * */
    getChartShare: params => httpRequest({url: '/dis/spYearlyPlan/share', method: 'post', params}),
    /**
     * 甘特图下发
     * */
    getChartPublish: params => httpRequest({url: '/dis/spYearlyPlan/distributeToDispatchOptimize', method: 'post', params}),
    /**
     * 获取资源合同
     * */
    getResContract: params => httpRequest({url: '/dis/spYearlyPlan/selectAllContractNumbers', method: 'get', params}),
    /**
     * 获取港口信息
     * */
    getPortInfo: params => httpRequest({url: '/dis/spInformation/getPort', method: 'get', params}),
    /**
     * 获取船期国
     * */
    getFlagStates: params => httpRequest({url: '/dis/spInformation/getFlagStates', method: 'get', params}),
    /**
     * 根据条件筛选船舶
     * */
    getFilterShips: params => httpRequest({url: '/dis/spInformation/getShips', method: 'post', params}),
    /**
     * 历史调度
     * */
   // getPlanHistory: params => httpRequest({url: '/dis/spYearlyPlan/historyDispatch', method: 'post', params}),
    getPlanHistory: params => httpRequest({url: '/dis/spYearlyPlan/scheme/history', method: 'post', params}),
    /**
     * 获取某条数据的历史记录
     * */
   // getOneMoreHistory: params => httpRequest({url: '/dis/spYearlyPlan/getPlanSchemeDetailHistorys', method: 'post', params}),
    getOneMoreHistory: params => httpRequest({url: '/dis/spYearlyPlan/scheme/detail/history', method: 'post', params}),
    /**
     * 获取最新的计划的排布信息
     * */
    getPlanLastGantt: params => httpRequest({url: '/dis/spYearlyPlan/getPlanSchemeNewOne', method: 'get', params}),
    /**
     * 尝试排布
     * */
    getPlanPersonHistory: params => httpRequest({url: '/dis/spYearlyPlan/getTryToArrange', method: 'get', params}),
    /**
     * 尝试排布-还原方案
     * */
   // getPlanHistoryReset: params => httpRequest({url: '/dis/spYearlyPlan/reduceProgrammeBySchemeId', method: 'post', params}),
    getPlanHistoryReset: params => httpRequest({url: `/dis/spYearlyPlan/scheme/rollback/${params.schemeId}`, method: 'get'}),
    /**
     * 删除甘特图中的数据
     * */
    deleteGanttOne: params => httpRequest({url: '/dis/spYearlyPlan/deleteSpYearPlanSchemeDetail', method: 'delete', params}),
    /**
     * 年度计划新增中表格分页
     * */
    postGanttTable: params => httpRequest({url: '/dis/spYearlyPlan/ganttPage', method: 'post', params}),
    /**
     * 查询方案详情
     * */
    getCaseInfo: params => httpRequest({url: '/dis/spYearlyPlan/selectGanttInfo', method: 'get', params}),
    /**
     * 船舶排期表
     * */
    postShipSchedule: params => httpRequest({url: '/dis/spShipSchedule/selectShipSchedules', method: 'post', params}),
    /**
     * 增加虚拟船
     * */
    postVirtualShip: params => httpRequest({url: '/dis/spInformation/saveVirtualShip', method: 'post', params}),
    /**
     * 年度计划列表导出
     * */
    postPageLngExport: params => httpRequest({url: '/dis/spYearlyPlan/exportYearlyPlan', method: 'post', params}),
    /**
     * 新增年度计划中表格导出
     * */
    postPageLngAddExport: params => httpRequest({url: '/dis/spYearlyPlan/exportYearlyPlanDetail', method: 'post', params}),
    /**
     * 年度计划甘特图表格导出
     * */
    postPageLngGanttExport: params => httpRequest({url: '/dis/spYearlyPlan/exportYearlyPlanDetailAndGante', method: 'post', params}),
    /**
     * 获取资源方查询
     * */
    getAllSeller: params => httpRequest({url: '/dis/spYearlyPlan/selectAllSellers', method: 'get', params}),
}
